
import customerRequest from "../api/request.js"

const customerApi={}
//物业
customerApi.wuye =params=> customerRequest('customer/wuye',params,'GET')
//行业
customerApi.hangye = params => customerRequest('customer/hangye', params, 'GET')
//面积
customerApi.area = params => customerRequest('customer/area', params, 'GET')
//需求
customerApi.xuqiu = params => customerRequest('customer/xuqiu', params, 'GET')
//配电
customerApi.peidian = params => customerRequest('customer/peidian', params, 'GET')
//消防
customerApi.xiaofang = params => customerRequest('customer/xiaofang', params, 'GET')
//环评
customerApi.huanping = params => customerRequest('customer/huanping', params, 'GET')
//资源
customerApi.source = params => customerRequest('customer/source', params, 'GET')
//大组
customerApi.bigpart = params => customerRequest('customer/bigpart', params, 'GET')
//小组
customerApi.group = params => customerRequest('customer/group', params, 'GET')
//盘源推荐
customerApi.recommdPanyuan = params => customerRequest('customer/recommdPanyuan', params, 'GET')
//更新状态
customerApi.submitStatus = params => customerRequest('customer/submitStatus', params, 'POST')
//更新客户
customerApi.update = params => customerRequest('customer/Customer/update', params, 'POST')

//自己跟进

customerApi.shareUserMe = params => customerRequest('customer/shareUserMe', params, 'POST')
/**
 * 录入客户
 * params :{}
 * name  string 姓名
 * telephone string 电话
 * address string 地址
 * area_id int 面积id
 * hangye_id int 行业id
 * peidian_id int 配电
 * xuqiu_id int 需求id
 * source_id int 资源id
 * huanping_id int 环评id
 * wuye_id int 物业id
 * xiaofang_id 消防id
 * desc string 描述
 */
customerApi.submitCustomer = params => customerRequest('customer/submitCustomer', params, 'POST')

/**
 * 写跟进
 * customer_id
 * desc
 */
customerApi.setCustomerRecords = params => customerRequest('customer/setCustomerRecords', params, 'POST')
/**
 * 客户信息列表
 *page=1 
 *status 0 全部 1未分配 2 跟进中
 */
customerApi.getCustomers = params => customerRequest('customer/getCustomers', params, 'GET')

/**
 * 客户详情
 * customer_id 客户id
 */
customerApi.getCustomerDetails = params => customerRequest('customer/getCustomerDetails', params, 'GET')
/**
 * 分组列表
 */
customerApi.getDepartments = params => customerRequest('customer/getDepartments', params, 'GET')
/**
 * 分配到组
 * customer_id 客户id
 * group_id   小的那个分组id
 */
customerApi.shareGroupCustomer = params => customerRequest('customer/shareGroupCustomer',params,'POST')
/**
 * customer_id
 * ower_user_id 分配给谁的id
 * 分配到用户
 */
customerApi.shareUserCustomer = params => customerRequest('customer/shareUserCustomer',params,'POST')

/**
 * customer_id
 * ower_user_id 分配给谁的id
 * 重新分配到用户
 */
customerApi.repeatShareUserCustomer = params => customerRequest('customer/repeatShareUserCustomer', params, 'POST')



/**
 * 容量统计
 */
customerApi.sourceCount = params => customerRequest('customer/sourceCount', params, 'GET')
/**
 * 分组人员
 */
customerApi.groupUser =params=> customerRequest('customer/groupUser', params, 'GET')
/**
 * 分配人员列表
 */
customerApi.getUsers = params => customerRequest('customer/getUsers', params, 'GET')
/**
 * 组成员
 */
customerApi.getSecondDepartUser = params => customerRequest('customer/getSecondDepartUser', params, 'GET')
/**
 * 修改跟进记录
 */
customerApi.followUpdate = params => customerRequest('customer/follow/update', params, 'POST')
export default customerApi

/**
 * 用法
 * 
 */

/*
import customerApi from "../../api/index.js"
customerApi.wuye({}).then(res => {
  console.log('res', res)
})
*/